package com.phiture.erp.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.HashMap;
import java.util.Map;

/**
 * @author YH
 * @date 2025/4/3
 * 采购检验状态
 * (0:不检验 1:抽检 2:全检)
 */

@Getter
@AllArgsConstructor
public enum ErpMaterialPurchasingCheckTypeEnum {
    NOT_CHECK(0, "不检验"),
    SPOT_CHECK(1, "抽检"),
    FULL_CHECK(2, "全检");

    private final Integer type;
    private final String desc;

    public static final Map<Integer, String> MATERIAL_PURCHASING_CHECK_TYPE_MAP = new HashMap<>(2);
    static {
        for (ErpMaterialPurchasingCheckTypeEnum typeEnum : ErpMaterialPurchasingCheckTypeEnum.values()) {
            MATERIAL_PURCHASING_CHECK_TYPE_MAP.put(typeEnum.type, typeEnum.desc);
        }
    }

    public static String convert(Integer type){
        return MATERIAL_PURCHASING_CHECK_TYPE_MAP.get(type);
    }


}
